package com.atguigu;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;


import java.util.Map;

/**
 * @author ：HB
 * @date ：Created in 2020/11/6 12:51
 * @description：easyExcal的读操作的监听
 */
public class StudentListener extends AnalysisEventListener<Student> {

    //一行一行的读取数据
    @Override
    public void invoke(Student student, AnalysisContext analysisContext) {
        System.out.println("****---"+student);
    }

    //读取表头信息
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头---"+headMap);
    }

    //读取完了以后的操作
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("读取数据over");
    }
}
